package com.thinkfit.jy.utils;

/**
 * 日志显示
 */
public class LogUtils {
    static LogUtils logUtils;

    public static final int CLOSE = -1;//关闭
    public static final int ALL = 0;//全部
    public static final int MOTION_DATA = 1;//蓝牙串口数据
    public static final int HINT = 2;//环节提示

    int currentType = HINT;

    public static LogUtils getInstance(){
        if(logUtils == null){
            logUtils = new LogUtils();
        }
        return logUtils;
    }

    public void l(int type ,String log){
        logcat(type,log);
    }
    public void logcat(int type,String log){
        if(currentType == ALL){
            System.out.println(log);
            return;
        }
        if(type == currentType){
            System.out.println(log);
        }
    }

    public void logType(int type){
        currentType = type;
    }
}
